package dao;

import dao.impl.ClientDAOImpl;

/**
 * Created by alexander.makalov on 23.10.2014.
 */
public class Factory {
    private static ClientDAO clientDAO = null;
    private static Factory instance = null;

    public static synchronized Factory getInstance(){
        if (instance == null){
            instance = new Factory();
        }
        return instance;
    }

    public ClientDAO getClientDAO(){
        if (clientDAO == null){
            clientDAO = new ClientDAOImpl();
        }
        return clientDAO;
    }
}
